package czw.com.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/test")
public class TestController {

    @Autowired
    private RedisTemplate redisTemplate;
    @RequestMapping(value = "/czw")
    public String test(String value){
        redisTemplate.opsForValue().set("czw", value);
        return (String) redisTemplate.opsForValue().get("czw");
    }



}
